//
//  TabViewBrowser.h
//  etionUI
//
//  Created by wangjian on 8/19/13.
//
//

#import <UIKit/UIKit.h>
#import "CTabView.h"

@class CTabViewBrowser;
@protocol CTabViewBrowserDelegate <NSObject>

- (UIView *)tabViewBorwser:(CTabViewBrowser *)tabViewBorwser contentViewAtIndex:(NSUInteger)index;

@optional
- (void)tabViewBorwserContentWillMove:(CTabViewBrowser *)tabViewBorwser;
- (void)tabViewBorwser:(CTabViewBrowser *)tabViewBorwser willMoveToIndex:(NSUInteger)index;
- (void)tabViewBorwser:(CTabViewBrowser *)tabViewBorwser didMoveToIndex:(NSUInteger)index;

@end

@interface CTabViewBrowser : UIView <CTabViewDelegate, UIScrollViewDelegate>

@property (nonatomic, readonly, retain) CTabView *tabView;
@property (nonatomic, assign) id<CTabViewBrowserDelegate>delegate;

- (id)initWithFrame:(CGRect)frame tabItems:(NSArray *)tabItems;
- (void)setTabItems:(NSArray *)tabItems;
- (NSUInteger)currentViewIndex;
- (void)moveToViewIndex:(NSUInteger)index;
- (CGRect)contentViewBounds;
- (void)reloadViewAtIndex:(NSUInteger)index;

- (void)disableItemFromIndex:(NSUInteger)index; //用于设置不能点击的项，从index开始，如果index>item count则所有项均能点击

- (void)disableScroll;
- (void)enableScroll;

@end
